Skip to content

Conversation

@NoaheCampbell
Copy link
Contributor

This PR adds documentation regarding the new additions to the replicated CLI regarding profiles and the .replicated config file. It describes how to authenticate via the new profile command and how to easily migrate to it although it is not mandatory to, as well as how to edit, remove, and swap profiles as needed.

It also describes the new .replicated config file and how to specify the layout of the config file and how to make any needed changes to it, such as changing paths to helm charts, preflight checks, and support bundle specs.

@NoaheCampbell NoaheCampbell requested a review from a team as a code owner October 22, 2025 23:14
@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for replicated-docs ready!

Name Link
🔨 Latest commit ef8bf43
🔍 Latest deploy log https://app.netlify.com/projects/replicated-docs/deploys/6904d23066c2ba0008352b62
😎 Deploy Preview https://deploy-preview-3611--replicated-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for replicated-docs-upgrade ready!

Name Link
🔨 Latest commit ef8bf43
🔍 Latest deploy log https://app.netlify.com/projects/replicated-docs-upgrade/deploys/6904d22e9694310008c2da62
😎 Deploy Preview https://deploy-preview-3611--replicated-docs-upgrade.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@NoaheCampbell NoaheCampbell added type::feature type::docs Improvements or additions to documentation labels Oct 22, 2025
@replicated-ci replicated-ci added type::docs Improvements or additions to documentation type::feature labels Oct 22, 2025
Copy link
Contributor

@paigecalvert paigecalvert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NoaheCampbell thanks for your patience with this! I made a handful of edits:

  • Moved the info on profiles into the existing Installing the Replicated CLI topic, where we already had info about env vars and replicated login. As is, we can't add it as a separate topic in the Replicated CLI sidebar category because that sidebar category gets automatically rewritten each time the CLI docs are generated. Additionally, seemed like it was probably well enough covered as a section in that existing doc versus adding a new page
  • For the same reason, also moved the .replicated stuff to its own sidebar category
  • Removed/condensed content from the original PR. I noticed some info that was repeated, and also some details that didn't seem needed (eg, the troubleshooting content). But lmk if you disagree with any of these removals
  • Split up the .replicated info into two pages (how-to/concepts and a reference) since it was quite large
  • Made some updates to the existing Replicated CLI authentication info in the Installing the Replicated CLI page (there were some details that were no longer accurate after the addition of the replicated profiles option. more details in the comments below)
  • Other similar changes

I've also added a few questions for you in the comments where I think the technical details could be made a little more clear. Would you take a look and see what you think?

thanks again, and do lmk if you'd want to talk through any of this! happy to zoom

For more information about the `docker run` command, see [docker run](https://docs.docker.com/engine/reference/commandline/run/) in the Docker documentation.
:::note
Installing in Docker environments requires that you set the `REPLICATED_API_TOKEN` environment variable to authorize the Replicated CLI with an API token. For more information, see [Set Environment Variables](/reference/replicated-cli-installing#env-var).
:::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing in Docker environments requires that you set the REPLICATED_API_TOKEN environment variable to authorize the Replicated CLI with an API token. For more information, see Set Environment Variables.

@NoaheCampbell Is this still accurate? As in, is using a replicated profile for auth not supported for Docker?

- Automatically searches for Helm charts in the current directory
- Auto-detects preflight specs (files with `kind: Preflight`)
- Auto-detects support bundle specs (files with `kind: SupportBundle`)
- Uses default linting configuration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NoaheCampbell is the auto-detection/auto searching described here any different from the current state of things? I wasn't sure what it meant that the CLI automatically searches for Helm charts or auto detects preflight specs. Which commands use this auto detection functionality and for what purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The auto discovery is for when the feature toggle for Release Validation v2 is enabled and the release lint command is run without a .replicated config file to tell it where helm charts, preflights, and support bundles are


```bash
replicated config init
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ do you need to run this from a particular directory? Maybe from the root for single project repos or from the directory for monorepos?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.replicated config files are able to be in any directory as they can contain specific settings for that directory alone, so there could be one in the root, and several more in lower directories and we merge the .replicated files if we detect multiple, and prioritizing the lowest level config file with any conflicts.

```bash
replicated config init
```
The `replicated config init` command automatically detects Helm charts, preflight specs, and support bundles in your project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and support bundles

@NoaheCampbell How are support bundles used? I didn't see any fields in the .replicated file reference for setting support bundle preferences.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support bundles are set in the manifests field in the .replicated config file since they dont require any additional fields to validate them unlike helm charts and preflights

The Replicated CLI determines which credentials to use for authentication in the following order:

1. `REPLICATED_API_TOKEN` environment variable. Environment variables take precedence, allowing temporary overrides without modifying stored profiles.
2. Replicated profile passed with the `--profile` flag. This allows for a per-command override of the default Replicated profile.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replicated profile passed with the --profile flag. This allows for a per-command override of the default Replicated profile.

just a note that the --profile stuff is minimally doc'd as part of this PR. This should be at least documented in the CLI help text for each command that supports it

-h, --help help for lint
-o, --output string The output format to use. One of: json|table (default "table")
--yaml-dir yaml The directory containing multiple yamls for a Kots release. Cannot be used with the yaml flag.
--verbose Show verbose output, including discovered images
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NoaheCampbell I'm ok if you want to add this in as part of this PR, but note that it's going to be overwritten when we updated the CLI help text and auto generate these CLI docs

'reference/replicated-cli-config-file',
'reference/replicated-cli-config-file-reference',
],
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: we can't manually add file to the Replicated CLI section in this sidebar. It'll get overwritten by the CLI docs automation. Recommend adding these pages to a new category instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type::docs Improvements or additions to documentation type::feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants